import config from "@/config"
import http from "@/utils/request"

export default {
	page: {
		url: `${config.API_URL}/externalProcess/page`,
		name: "分页获取",
		get: async function (params) {
			return await http.get(this.url, params);
		}
	},
	download: {
		url: `${config.API_URL}/externalProcess/download`,
		name: "文件下载",
		get:  function (params) {
			return  http.download(this.url, params);
		}
	},
	detail: {
		url: `${config.API_URL}/externalProcess/`,
		name: "获取详情",
		get: async function (id, params) {
			return await http.get(this.url+id, params);
		}
	},
	delete: {
		url: `${config.API_URL}/externalProcess/`,
		name: "删除",
		delete: async function (id, params) {
			return await http.delete(this.url+id, params);
		}
	},
	update:{
		url: `${config.API_URL}/externalProcess/update/`,
		name: "更新用户信息",
		post: async function(data){
			return await http.post(this.url, data);
		}
	},
	insert:{
		url: `${config.API_URL}/externalProcess/insert/`,
		name: "新增用户信息",
		post: async function(data){
			return await http.post(this.url, data);
		}
	}
}

